//
//  GMHSurroundDetailCell.m
//  
//
//  Created by 郭明皓 on 15/10/26.
//
//

#import "GMHSurroundDetailCell.h"
#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height
@implementation GMHSurroundDetailCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)dealloc
{
    [_address release];
    [_wather release];
    [_imagesView release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if ( self) {
        [self createData];
    }
    return  self;
}
- (void)createData
{
    self.address = [[UILabel alloc]init];
    [self.contentView addSubview: self.address];
    [_address release];
    self.address.font = [UIFont systemFontOfSize:16];
    
    self.wather = [[UILabel alloc]init];
    [self.contentView addSubview: self.wather];
    [_wather release];
    self.wather.font = [UIFont systemFontOfSize:12];
    
    self.imagesView = [[UIImageView alloc]init];
    [self.contentView addSubview: self.imagesView];
    [_imagesView release];
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.imagesView.frame = CGRectMake(5, self.contentView.center.y, 10, 10);
    self.address.frame = CGRectMake(20, 0, WIDTH  - 20, HEIGHT / 2);
    self.wather.frame = CGRectMake(20, HEIGHT / 2, WIDTH - 20, HEIGHT / 2);
    
}
@end
